/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package views;

import java.awt.Frame;
import javax.swing.JButton;
import javax.swing.JLabel;
import rpg.EnchantedWeapon;
import rpg.LootFactory;
import rpg.Weapon;
import rpg.gameSkeleton.InventoryFrame;

/**
 *
 * @author Emmanouil Samatas
 */
public class InventoryWeaponStatus extends InventoryItemStatus{
    private JLabel weaponName = new JLabel();
    private JLabel weaponAttack = new JLabel();
    private JLabel weaponType = new JLabel();
    private JButton equip = new JButton("Equip");
    private JButton upgrade = new JButton("Upgrade");
    private JButton discard = new JButton("Discard");
    public InventoryWeaponStatus(){
                
        add(weaponName);
        add(weaponAttack);
        add(weaponType);
        add(equip);
        add(upgrade);
        add(discard);
       
    }
    
    public JLabel getWeaponName(){
        return this.weaponName;
               
    }
    
    public JLabel getWeaponAttack(){
        return this.weaponAttack;
    }
    
    public JLabel getWeaponType(){
        return this.weaponType;
    }
    
    public JButton getEquipButton(){
        return this.equip;
    }
    
    public JButton getUpgradeButton(){
        return this.upgrade;
    }
    
    public JButton getDiscardButton(){
        return this.discard;
    }
    public static void main(String[] args){
        Frame frame = new Frame();
        LootFactory lf =  LootFactory.getInstance();
        Weapon wp = lf.getNextWeapon(10);
        wp = new EnchantedWeapon(wp);
        InventoryWeaponStatus inv = new InventoryWeaponStatus();
        inv.getWeaponAttack().setText("Attack: "+String.valueOf(wp.getAttackBonus()));
        inv.getWeaponName().setText("Name: "+wp.getName() +" +"+ wp.getEnchantStatus());
        inv.getWeaponType().setText("Type: "+String.valueOf(wp.getType()));
        frame.add(inv);
        
        frame.setVisible(true);
    }
    
}
